﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class MonoTool : MonoBehaviour
{
    public static MonoTool Instance = null;
    [SerializeField]
    private RectTransform canvas;

    private void Awake()
    {
        Instance = this;
    }

    public Vector2 ToLocalPos(Vector2 screenPos)
    {
        Vector2 pos;
        RectTransformUtility.ScreenPointToLocalPointInRectangle(canvas, screenPos, null, out pos);
        return pos;
    }
}
